// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import Vuex from 'vuex'
import App from './App'
import router from './router'

import echarts from 'echarts'
import Element from 'element-ui'
import locale from 'element-ui/lib/locale/lang/zh-CN'

import dateRangePicker from '@/components/dateRangePicker'
import paginaTion from '@/components/paginaTion'

import { state, mutations } from './store/index'

Vue.config.productionTip = false

import 'normalize.css/normalize.css'
import 'element-ui/lib/theme-chalk/index.css'
import './styles/app.styl'
import './styles/overWrite.styl'

Vue.use(Vuex)
Vue.use(Element, { locale })

Vue.prototype.$echarts = echarts

Vue.component('dateRangePicker', dateRangePicker)
Vue.component('paginaTion', paginaTion)

const store = new Vuex.Store({
  state,
  mutations
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
